package chen.web;


import javax.sql.DataSource;

public class DataSourceProvider {
	
	private static DataSource ds = null;
	
	static void setDataSource(DataSource ds){
		if(ds == null) throw new NullPointerException("DataSource为空");
		DataSourceProvider.ds = ds;
	}
	
	public static DataSource getDataSource(){
		return ds;
	}
}
